iT邦幫忙

2023 iThome 鐵人賽

DAY 5
1
IT管理

每天利用 Jira 開單時,練習一個密技,應該不是薪水小偷吧!?系列 第 5

Day5-你不是不好只是太用腦,快啟用 Jira 自動提醒你有五天沒更新票了!

  • 分享至 

  • xImage
  •  

各位鐵人們,晚安~~今晚廢話不多說直接進主題!

今日分享主題

  1. Workflow Keywords
  2. 啟用 Transitioned Automation template - When an issue remains for 5 days without an update → send a notification to the Assignee

Workflow Keywords

  1. JQL:Jira Query Language 簡稱 JQL,其語法和 SQL 很類似,有些無法在快速或基本搜尋中定義的條件會使用 JQL ,透過自訂義條件縮小搜尋範圍,提高效率。若想更了解 JQL,歡迎查閱以下參考資料。
    再次站在鐵人的肩膀上 第一次使用 Jira 就上手第 18 篇
    Atlassian 文章 Use advanced search with Jira Query Language (JQL)JQL: Get started with advanced search in Jira

  2. Assignee:任務負責人https://ithelp.ithome.com.tw/upload/images/20230920/20162673SyB9IjxKIr.png

我相信大家都理解惹~那我們今天的練習主題就開始了


啟用 Transitioned Automation template

今天要練習的主題: When an issue remains for 5 days without an update → send a notification to the Assignee

Ticket 被轉換到某一工作流的 status 中(如 To do 或 In Progress ) 停留了五天,系統會自動提醒 Assignee 。

  • 在揭露這個 Automation Rules 之前,我先來歌頌一下,這個功能對於我這種頭腦簡單、四肢發達、常常忘東忘西的人來說,真的可以做到 不求人 非常方便!
  • 今晚,該 Automation rule 設定會用到 JQL,並看仔細 Whe、If、Than 的設定!
  1. 首先從專案 Board 點擊左邊功能區的 [Project setting]。https://ithelp.ithome.com.tw/upload/images/20230920/20162673rks8sgd5Q9.png

  2. 點擊左邊功能區的 [Automation]。https://ithelp.ithome.com.tw/upload/images/20230920/20162673aHW1eeJHiE.png

  3. 點擊中間上方的 [Rules] 、[Audit log] 、 [Templates] 的 [Templates]。
    https://ithelp.ithome.com.tw/upload/images/20230920/20162673xgW5g4X7RJ.png

  4. 進到 Automation templates 選單後向下拉。https://ithelp.ithome.com.tw/upload/images/20230920/201626734TQRmk2H5y.png

  5. 找到 When an issue remains for 5 days without an update → send a notification to the Assignee ,並點擊進去。https://ithelp.ithome.com.tw/upload/images/20230920/20162673c0zxBiTacY.png

  6. Rules details 已經自動的填完 [Name][Description]
    [Name]:When an issue remains for 5 days without an update → send a notification to the Assignee

[Description] :Keep your issues up to date and ensure everyone is on the same page. When 5 days pass on an issue without an update, this rule will email the Assignee.
https://ithelp.ithome.com.tw/upload/images/20230920/20162673zkQLFukB5Q.png

  1. 詳看 [When] 的設定

我們也點擊 [When] 了解一下 Automation rules 的設定。

以下需要說明需要兩張圖一起看
(1)
When:Scheduled
Every day at 9:00 AM

(2)
設定分為 BasicAdvanced (CRON expression)

Basic

意思是設定每天在亞洲/台北早上九點的時間會執行一個 JQL 搜尋並對查詢中的每個工作事項執行操作。

  • 在紫色的時間區塊先預告了下次執行時間是 Thursday, September 21, 2023 9:00 AM CST,而接下來 10 次執行時間暫時先隱藏起來,你也可以點擊 [Show next 10 runs] ,就會出現接下來 10 天日期和時間。

Advanced (CRON expression)

6碼時間的進階設定可以使用 Cron表達生成器
https://ithelp.ithome.com.tw/upload/images/20230921/20162673Zd08xM1XFW.png

(3)

JQL 設定

updated <= startOfDay(-5d) AND statusCategory != Done
這段語法的意思是指要系統執行 Ticket 被拉到 Done 以外的 status,有 5 天沒有更新。

  • AND 是而且 statusCategory 不在 Done
  • 「不等於(Not equal)」時,通常都是用 != 表示。

https://ithelp.ithome.com.tw/upload/images/20230920/20162673IwuPvoWNp0.png

https://ithelp.ithome.com.tw/upload/images/20230921/201626733xQh3WFux2.png

  1. 詳看 [IF] 的設定
    我們也點擊 [If] 了解一下 Automation rules 的設定。
    (1)
    If:Matches Assignee is not empty

(2)

  • 如果條件塊內的所有指定條件都符合,則該塊內的操作將被執行。否則,將繼續評估後續。
  • 你也可以選擇所有條件都符合或至少一項條件符合就被執行,其選項為畫面中的 [All conditions match][At least one condition matches]

https://ithelp.ithome.com.tw/upload/images/20230921/20162673JyysW0q2aT.png

  • Conditions 目前只有設定 Assignee is not empty ,若想修改可以點擊這個欄位的小箭頭修改設定。
    https://ithelp.ithome.com.tw/upload/images/20230921/20162673i17qGxiKuo.png
  1. 詳看 [than] 的設定
    我們也點擊 [than] 了解一下 Automation rules 的設定。

(1) Than:Send email
Assignee
Issue{{issue.key}}has not been updated in 5 days

(2)寄信對象
目前是設定 Assignee,也可以增加其他人、CC、BCC

(3)信件主旨和信件內文設定

  • Subject:Issue {{issue.key}} has not been updated in 5 days
  • Content:

Hi {{issue.assignee.displayName}},

The following issue hasn't been updated in 5 days:
{{issue.key}} - {{issue.summary}}

Learn more about this issue: {{issue.url}}

Regards,

Jira Automation

https://ithelp.ithome.com.tw/upload/images/20230921/201626731zTqHYUCaf.png

  • More options
    https://ithelp.ithome.com.tw/upload/images/20230921/20162673zjMxDp2EXR.png
  1. 如果沒問題,最後再按下右上角的 [Turn it on],恭喜完成 ✅

https://ithelp.ithome.com.tw/upload/images/20230921/20162673Fkld5ga6b0.png

今天開始完成的 Ticket 我們就先不拉到 [Done],我們來實驗五天後是否會收到提醒的 Email。

我們明天見囉~


上一篇
Day4-你不是不好只是太用腦,快啟用 Jira Transitioned Automation assigned
下一篇
Day6-又是樸實無華的開單日常-你卡一個 Bug ,Jira 自動抓交替來幫你看!
系列文
每天利用 Jira 開單時,練習一個密技,應該不是薪水小偷吧!?30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言